package com.tang.objectOriented.senior.enum_;

public class Enumeration02 {
    //编写一个main方法
    public static void main(String[] args) {
        System.out.println(Season01.AUTUMN);
        System.out.println(Season01.SPRING);
    }
}



class Season01{
    private String name;
    private String desc;//描述
    //定义了四个对象, 固定.
    public static final Season01 SPRING = new Season01("春天", "温暖");
    public static final Season01 WINTER = new Season01("冬天", "寒冷");
    public static final Season01 AUTUMN = new Season01("秋天", "凉爽");
    public static final Season01 SUMMER = new Season01("夏天", "炎热");
    private Season01(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }
    public String getName() {
        return name;
    }
    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return "Season01{" +
                "name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                '}';
    }
}
